package com.tangyuan.video.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tangyuan.model.UserVideoCollection;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface VideoCollectionMapper extends BaseMapper<UserVideoCollection> {

    @Update("update `user_video_collection` set `is_delete` = #{isDelete} where user_id=#{userId} AND video_id=#{videoId}")
    void removeCollectionVideo(@Param("userId")Long userId, @Param("videoId")Long videoId,@Param("isDelete") Integer isDelete);
}
